//
//  QLScreenItemVC.m
//  神约
//
//  Created by qlwl on 17/2/6.
//  Copyright © 2017年 qlwl. All rights reserved.
//

#import "QLScreenItemVC.h"

@interface QLScreenItemVC ()
//排序
@property (weak, nonatomic) IBOutlet UIButton *pBtn1;
@property (weak, nonatomic) IBOutlet UIButton *pBtn2;
@property (weak, nonatomic) IBOutlet UIButton *pBtn3;
//性别
@property (weak, nonatomic) IBOutlet UIButton *xBtn1;
@property (weak, nonatomic) IBOutlet UIButton *xBtn2;
@property (weak, nonatomic) IBOutlet UIButton *xBtn3;
//年龄
@property (weak, nonatomic) IBOutlet UIButton *nBtn1;
@property (weak, nonatomic) IBOutlet UIButton *nBtn2;
@property (weak, nonatomic) IBOutlet UIButton *nBtn3;
@property (weak, nonatomic) IBOutlet UIButton *nBtn4;
//是否认证
@property (weak, nonatomic) IBOutlet UIButton *rBtn1;
@property (weak, nonatomic) IBOutlet UIButton *rBtn2;
@end

@implementation QLScreenItemVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setNavTitle:@"筛选"];
    //[self selectBtn:self.pBtn1 inBtns:@[self.pBtn1,self.pBtn2,self.pBtn3]];
    [self selectBtn:self.xBtn1 inBtns:@[self.xBtn1,self.xBtn2,self.xBtn3]];
    [self selectBtn:self.nBtn1 inBtns:@[self.nBtn1,self.nBtn2,self.nBtn3,self.nBtn4]];
    [self selectBtn:self.rBtn1 inBtns:@[self.rBtn1,self.rBtn2]];
}


- (IBAction)pBtn1Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.pBtn1,self.pBtn2,self.pBtn3]];
}
- (IBAction)pBtn2Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.pBtn1,self.pBtn2,self.pBtn3]];
}
- (IBAction)pBtn3Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.pBtn1,self.pBtn2,self.pBtn3]];
}

- (IBAction)xBtn1Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.xBtn1,self.xBtn2,self.xBtn3]];
}
- (IBAction)xBtn2Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.xBtn1,self.xBtn2,self.xBtn3]];
}
- (IBAction)xBtn3Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.xBtn1,self.xBtn2,self.xBtn3]];
}

- (IBAction)nBtn1Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.nBtn1,self.nBtn2,self.nBtn3,self.nBtn4]];
}
- (IBAction)nBtn2Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.nBtn1,self.nBtn2,self.nBtn3,self.nBtn4]];
}
- (IBAction)nBtn3Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.nBtn1,self.nBtn2,self.nBtn3,self.nBtn4]];
}
- (IBAction)nBtn4Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.nBtn1,self.nBtn2,self.nBtn3,self.nBtn4]];
}

- (IBAction)rBtn1Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.rBtn1,self.rBtn2]];
}
- (IBAction)rBtn2Click:(id)sender {
    [self selectBtn:sender inBtns:@[self.rBtn1,self.rBtn2]];
}

- (void)selectBtn:(UIButton *)btn inBtns:(NSArray *)btns
{
    for (UIButton * subBtn in btns) {
        subBtn.selected = NO;
        subBtn.userInteractionEnabled = YES;
    }
    btn.selected = YES;
    btn.userInteractionEnabled = NO;
}

- (IBAction)locationBtnClick:(id)sender {
}
- (IBAction)heightBtnClick:(id)sender {
}



@end
